import request from '@/utils/request'

// 查询权限定义列表
export function listPermissiondef(query) {
  return request({
    url: '/permission/permissiondef/list',
    method: 'get',
    params: query
  })
}

// 查询权限定义详细
export function getPermissiondef(guid) {
  return request({
    url: '/permission/permissiondef/' + guid,
    method: 'get'
  })
}

// 新增权限定义
export function addPermissiondef(data) {
  return request({
    url: '/permission/permissiondef',
    method: 'post',
    data: data
  })
}

// 修改权限定义
export function updatePermissiondef(data) {
  return request({
    url: '/permission/permissiondef',
    method: 'put',
    data: data
  })
}

// 删除权限定义
export function delPermissiondef(guid) {
  return request({
    url: '/permission/permissiondef/' + guid,
    method: 'delete'
  })
}

// 导出权限定义
export function exportPermissiondef(query) {
  return request({
    url: '/permission/permissiondef/export',
    method: 'get',
    params: query
  })
}

export function getDictEmnu(query) {
  return request({
    url: '/permission/permissiondef/getDictEmnu',
    method: 'get',
    params: query
  })
}